package src.lab02.test11;

/**
 * Created by MECHREV on 2017/10/25.
 */
public class Rectangle implements Printx{
    double length;
    double wideth;
    double area;
    double perimeter;
    double area(){
        area=length*wideth;
        return area;
    }
    double perimeter(){
        perimeter=(length+wideth)*2;
        return perimeter;
    }
    @Override
    public void printMyWay() {
        System.out.println("长");
        System.out.println(length);
        System.out.println("宽");
        System.out.println(wideth);
        System.out.println("周长");
        System.out.println(perimeter());
        System.out.println("面积");
        System.out.println(area());

    }

    public static void main(String[] args) {

    }


}
